from django.urls import path, include

from web.views import account, home, manage, commodity

urlpatterns = [
    # 注册功能路由
    path('register/', account.register, name='register'),
    path('sms/code/', account.send_sms, name='send_sms'),
    path('login/sms/', account.login_sms, name='login_sms'),
    path('login/', account.login, name='login'),
    path('image/code/', account.image_code, name='image_code'),
    path('index/', home.index, name='index'),
    path('logout/', account.logout, name='logout'),

    # 列表
    path('commodity/list/', commodity.goods_list, name='commodity_list'),
    path('manage/<str:good_id>/', commodity.goods_modify, name='commodity_modify'),

    # 管理
    path('manage/<str:good_id>/', include([
        path('wiki/', manage.wiki, name='wiki')

    ])),

]
